<script setup lang="ts">
const emit = defineEmits(['search', 'reset'])

defineProps({
  loading: {
    type: Boolean,
    default: false
  },
})
</script>

<template>
  <el-form
    :inline="true"
    v-bind="$attrs"
  >
    <slot></slot>
    <div>
      <el-button
        type="primary"
        :disabled="loading"
        @click="emit('search')"
      >
        查询
      </el-button>
      <el-button
        :disabled="loading"
        @click="emit('reset')"
      >
        重置
      </el-button>
    </div>
  </el-form>
</template>

<style scoped lang="less">
@import "SearchForm.less";
</style>
